import asyncio
import logging
from aiogram import Bot, Dispatcher, types
from aiogram.filters import Command
from messages import start_mess
from handlers import birthday_fsm, today, people
from db import Base, engine
import os

logging.basicConfig(level=logging.INFO)
bot = Bot(token=os.environ.get('BOT_TOKEN'), parse_mode="HTML")
dp = Dispatcher()
dp.include_routers(birthday_fsm.router, today.router, people.router)


@dp.message(Command("start"))
async def process_start_command(message: types.Message):
    await message.answer(start_mess)


async def main():
    Base.metadata.create_all(engine)
    await dp.start_polling(bot)


if __name__ == "__main__":
    asyncio.run(main())
